<!DOCTYPE HTML>
<html>
<head>
    {include file='common_header'}
    <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css" rel="stylesheet" />
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 骑手管理 <span class="c-gray en">&gt;</span> 骑手列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href='javascript:location.replace(location.href="{:Url('statistics')}");' title="刷新" >
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray">
            <span class="text-c">
                <span class="select-box inline" style="margin-bottom:10px;">
                        <select id="o_type" class="singleSelect select" value="{}" style="width: 200px">
                            <option value="">请选择骑手</option>
                            {foreach name='riderlist' item="ls"}
                              <option value="{$ls->realname}" {if condition="$name eq $ls->realname"}selected{/if} >{$ls->realname}</option>
                            {/foreach}
                        </select>
                </span>
            </span>
        <a  href="javascript:;" onclick="downexcel('excel')" style="margin-left:14px;" >
            <p class="btn btn-secondary radius">订单导出</p>
        </a>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr>
            <th scope="col" colspan="9"></th>
        </tr>
        <tr class="text-c">
            <th width="40">序号</th>
            <th width="90">骑手名称</th>
            <th width="80">订单数量</th>
            <th width="130">订单总额</th>
        </tr>
        </thead>
        <tbody>
        {foreach name="$list" item="v"}
        <tr class="text-c">
            <td>{$v->id}</td>
            <td>{$v->realname}</td>
            <td>{$v->ordernum}</td>
            <td>{$v->money}</td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    <div class="page">
        {$page}
    </div>
</div>
<!--_footer 作为公共模版分离出去-->
{include file='common_footer'}
<!--/_footer 作为公共模版分离出去-->
</div>
</body>
<script type="text/javascript" src="http://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('#o_type').select2({
            language: {
                noResults: function (params) {
                    return "暂无数据";
                }
            }
        });
    });
</script>
<script>
    $('#o_type').change(function () {
         var type = '';
         downexcel(type);
    });
    function downexcel(type) {
            var obj = $("#o_type option:selected").val();
            goUrl('?name=' + obj+'&type='+type);
     }
</script>




</html>